package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 渠道推广
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_channel")
public class Channel extends Model<Channel> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "channel_code", type = IdType.NONE)
    private String channelCode;
    /**
     * 渠道名称
     */
    @TableField("channel_name")
    private String channelName;
    /**
     * 联系人
     */
    @TableField("contact")
    private String contact;
    /**
     * 联系电话
     */
    @TableField("contact_phone")
    private String contactPhone;
    /**
     * 备注
     */
    @TableField("note")
    private String note;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    /**
     * 是否启用
     */
    @TableField("enable")
    private String enable;

    public void freeData() {
        this.channelCode = null;
        this.channelName = null;
        this.contact = null;
        this.contactPhone = null;
        this.note = null;
        this.addTime = null;
        this.updateTime = null;
        this.enable = null;
    }

}
